package com.wenzhi.studentservice.configurarion;

import com.wenzhi.studentservice.entity.AccountEntity;
import com.wenzhi.studentservice.entity.UserEntity;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfiguration {

    @Bean
    public UserEntity userEntity() {
        UserEntity user = new UserEntity();
        user.setId(12L);
        user.setName("wenzhi");
        user.setAge(18);

        AccountEntity accountEntity = new AccountEntity();
        accountEntity.setTitle("用户2号");
        user.setAccountEntity(accountEntity);

        return user;

    }
}
